﻿using Flurl.Http;
using HandyControl.Controls;
using Newtonsoft.Json;
using Reconstruct_Desktop.Apiservice.InPut;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Org.BouncyCastle.Math.EC.ECCurve;
using wms_wpf.Apiservice;
using AbpApplication.AppServices;
using NewWms.Extend;

namespace Reconstruct_Desktop.Apiservice
{
    public class CustomService_Client : ICustomService_Client
    {
   

        public async Task<string> RBTInRep(List<Custom_InPut_Client> InPut)
        {
            var url = $"http://{GlobalVariable.CustomIp}/WMSWebApi/api/RBT/RBTInRep";
            var data = InPut;
            string result = await url.PostJsonAsync(data).ReceiveString();
            ApiResponseCustom Response = JsonConvert.DeserializeObject<ApiResponseCustom>(result);
            Growl.Success(Response.Message, "msg");
            return Response.Message;

        }

        public async Task<string> RBTOutRep(List<Custom_InPut2_Client> InPut)
        {
            var url = $"http://{GlobalVariable.CustomIp}/WMSWebApi/api/RBT/RBTOutRep";
            var data = InPut;
            string result = await url.PostJsonAsync(data).ReceiveString();
            ApiResponseCustom Response = JsonConvert.DeserializeObject<ApiResponseCustom>(result);
            Growl.Success(Response.Message, "msg");
            return Response.Message;
        }


        
    }
}
